<?php

use app\assets\AppAsset;
use app\widgets\AppMenuWidget;use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\helpers\Html;
use yii\helpers\Url;

AppAsset::register($this);
/* @var $content */

$web_name = 'omc管理系统';
$page_title = trim(Html::encode($this->title));
$title = Yii::$app->controller->id == Yii::$app->controller->module->defaultRoute ? $web_name : "{$page_title} - {$web_name}";
?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= $title; ?></title>
    <?php $this->head(); ?>
</head>
<body>
<?php $this->beginBody(); ?>
<div id="header" class="header navbar navbar-fixed-top">
    <a class="navbar-brand" href="/">
        <?= Html::img('@asset/images/logo.png?v=211'); ?>
    </a>
</div>

<div class="main">
    <div class="left">
        <?= AppMenuWidget::widget(); ?>
    </div>
    <div class="right">
        <?php foreach (Yii::$app->session->getAllFlashes() as $k => $v): ?>
        <div class="alert alert-warning alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <?= $v; ?>
        </div>
        <?php endforeach; ?>
        <div class="content">
            <div class="page-title">
                <?= $this->params['page-title']; ?>
            </div>
            <?= $content; ?>
        </div>
    </div>
</div>
<?php $this->endBody(); ?>
</body>
</html>
<?php $this->endPage(); ?>
